//组合功能通用函数
 import { getUserInfoAPI } from '@/api'
import { showToast } from 'vant'
import { onMounted, ref } from 'vue'
export const userAreaList = () =>{
//区域数据
const areaList = ref<CityAreaList>()
onMounted(() => {

    areaList.value=bf.getAreaList()
    
})
    return {areaList}
}

export const UserInfo = () =>{
//区域数据
const userInfo = ref<ProfileInfo>({
    account: '',
    avatar: '',
    birthday: '',
    fullLocation: '',
    gender: '男',
    id: '',
    nickname: '',
    profession: '',
    provinceCode: '',
    cityCode: '',
    countyCode: ''
})
onMounted(() => {
   getUserInfo()
})
    const getUserInfo = async () => {
        userInfo.value=await getUserInfoAPI()
    
}
   return {userInfo} 
    
}